# Python 2.6.4
# Project Euler, Problem 28
# Copyright 2010 Talha Zaman

tot, n = 1, 1001
for i in range(3, n+1, 2):
    tot += ((i**2) * 4) - ((i-1) * 6)
print tot
